//
//  Constants.h
//  BaseTdkc
//
//  Created by DavidHuang on 16/7/1.
//  Copyright © 2016年 黄栋炜. All rights reserved.
//

#ifndef Constants_h
#define Constants_h

#define KEY_BASE_URL  @"http://192.168.5.100/arcgis/rest/services"

#define kMapServicePlistName  @"mapService.plist"


//空间参考
#define BaseTdkcSpatialWKID  2385



//屏幕尺寸
#define screenW [[UIScreen mainScreen] bounds].size.width
#define screenH [[UIScreen mainScreen] bounds].size.height
#define navHeight 64
#define tarBarHeight 49

#define ViewSize_OriginY(_VIEW_)  _VIEW_.frame.size.height+_VIEW_.frame.origin.y
#define ViewSize_OriginX(_VIEW_)  _VIEW_.frame.size.width+_VIEW_.frame.origin.x
#define pixelValue(number) (number) / 750.0 * [[UIScreen mainScreen] bounds].size.width


#define WS(weakSelf)  __weak __typeof(&*self)weakSelf = self;




//弹出提示框
#define ZZXAlert(_message_) UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:_message_ delegate:self cancelButtonTitle:@"确定" otherButtonTitles: nil]; \
[alert show];

#define testDataWithParams(params)  NSLog(@"%s***\n%@",__func__,params);

//是否为空或是[NSNull null]
#define NotNilAndNull(_ref)  (((_ref) != nil) && (![(_ref) isEqual:[NSNull null]]))
#define IsNilOrNull(_ref)   (((_ref) == nil) || ([(_ref) isEqual:[NSNull null]]))

//字符串是否为空
#define IsStrEmpty(_ref)    (((_ref) == nil) || ([(_ref) isEqual:[NSNull null]]) ||([(_ref)isEqualToString:@""]))
//数组是否为空
#define IsArrEmpty(_ref)    (((_ref) == nil) || ([(_ref) isEqual:[NSNull null]]) ||([(_ref) count] == 0))

#define OC(str) [NSString stringWithCString:(str) encoding:NSUTF8StringEncoding]

#endif /* Constants_h */
